/**
 * Copyright (C) 2018-2022
 * All rights reserved, Designed By www.yixiang.co
 * 注意：
 * 本软件为www.yixiang.co开发研制
 */
package co.yixiang.modules.security.entity.vo;

import co.yixiang.modules.security.enums.UserEnums;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotBlank;

/**
 * @author hupeng
 * @date 2018-11-30
 */
@Getter
@Setter
@NoArgsConstructor
public class AuthUser {

    @NotBlank
    private String username;

    @NotBlank
    private String password;

    private String code;

    private String uuid = "";

    /**
     * @see UserEnums
     * 角色
     */
    private UserEnums role;

    /**
     * 昵称
     */
    private String nickName;
    /**
     * 真实名称
     */
    private String realName;
    /**
     * 头像
     */
    private String face;
    /**
     * id
     */
    private String id;

    public AuthUser(String username, String uid, String realName, String avatar, UserEnums member) {
        this.username = username;
        this.uuid = uid;
        this.realName = realName;
        this.face = avatar;
        this.role = member;
    }

    @Override
    public String toString() {
        return "{username=" + username + ", password= ******}";
    }
}
